<script setup lang="ts">
import { ref } from 'vue'
const props = defineProps({
  title: {
    type: String,
  },
  cid: {
    type: String
  }
})



</script>

<template>
  <div class="heng">
    <span>{{ props.title }}</span>

    <!-- v-else-if 条件 -->
    <router-link v-if="props.title === '精选好文'" :to="{ name: 'article' }">全部</router-link>

    <!-- v-else 条件 -->
    <router-link v-else
      :to="{ name: 'courselist', params: { category: props.title } }">全部</router-link>
  </div>
</template>


<style scoped lang="scss">

.heng {
  span{
    font-size: 0.6rem;
    font-weight: 600;
  }
  a{
    font-size: 0.5rem;
    -webkit-tap-highlight-color: transparent;
  }
  display: flex;
  justify-content: space-between;
}
</style>
